{ include file="../Common/head_authority.html" }
<body>
<div class="container-fluid">
    <div class="row" style="margin: 20px 0px;">
        <b>用户列表</b>
        <a href="{$smarty.const.__APP__}?c=Authority&m=addUser" style="float: right;">添加用户</a>
    </div>
    <table class="table table-hover">
        <thead>
        <tr>
            <th>姓名</th>
            <th>邮箱</th>
            <th>操作</th>
        </tr>
        </thead>

        { foreach from="$userData" item="v" }
        <tr>
            <td class="col-sm-4 col-md-3 col-lg-3">{$v.username}</td>
            <td class="col-sm-4 col-md-5 col-lg-5">{$v.email}</td>
            <td class="col-sm-4 col-md-4 col-lg-4">
                <a href="{$smarty.const.__APP__}?c=Authority&m=editUser&id={$v.id}" class="btn btn-success btn-xs">编辑</a>
            </td>
        </tr>
        { /foreach }
    </table>
    <div class="col-sm-12 col-md-12 col-lg-12 pagination">
        <a href="#" class="pagination-info">共条<b>{$data.sumRows}</b>记录，本页显示<b>{$data.startRows}-{$data.endRows}</b></a>&nbsp;
        <a href="#" class="pagination-info">{$data.currentPage}/{$data.sumPage}</a>&nbsp;
        <a href="{$smarty.const.__APP__}" class="pagination-link">首页</a>
        <a href="{$smarty.const.__APP__}?c=Authority&m=userList&page={$data.prePage}" class="pagination-link">上一页</a>
        <a href="{$smarty.const.__APP__}?c=Authority&m=userList&page={$data.nextPage}" class="pagination-link">下一页</a>
        <a href="{$smarty.const.__APP__}?c=Authority&m=userList&page={$data.sumPage}" class="pagination-link">尾页</a>&nbsp;&nbsp;
        <input type="text" class="jumpPage" id="jumpPage"/>
        <a href="#" class="pagination-link" id="pagination-jump">跳转</a>
    </div>
</div>
{literal}
<script type="text/javascript">
    $('#pagination-jump').click(function(){
        var page = $('#jumpPage').val();
        location.href = './index.php?c=Authority&m=userList&page='+page;
    })
</script>
{/literal}
</body>
</html>